package com.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import com.entity.AF_sale;


@Repository("afMapper")
public interface AFDao {
	@Insert("insert into af_server values(null,#{user_id},#{content},#{date},#{shop_id},#{good_id},#{as_state},#{image})")
	public int sendcomment(AF_sale as);
	
	@Select("select * from af_server where shop_id=#{shop_id}")
	public List<AF_sale> selectcList(@Param("shop_id") int s_id);
	
	@Update("UPDATE af_server SET as_state=#{as_state} WHERE as_id=#{as_id};")
	public int dealas(@Param("as_state") int as_state,@Param("as_id") int as_id);
}
